package com.hjxr.quota.datasource.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 维度表
 * </p>
 *
 * @author sun
 * @since 2020-09-16
 */
@Data
@TableName("QUOTA_DIMENSION")
@ApiModel(value = "QUOTA_DIMENSION", description = "维度表")
@KeySequence(value = "SEQ_QUOTA_DIMENSION", clazz = Integer.class)
public class QuotaDimension extends Model<QuotaDimension> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "ID", type = IdType.INPUT)
    private Integer id;

    @ApiModelProperty(value = "维度名称")
    @TableField("DIMENSION_NAME")
    private String dimensionName;

    @ApiModelProperty(value = "维度编码")
    @TableField("DIMENSION_CODE")
    private String dimensionCode;

    @ApiModelProperty(value = "上级维度ID")
    @TableField("UPPER_ID")
    private Integer upperId;

    @ApiModelProperty(value = "维度类型：1,公用;2,私有；")
    @TableField("DIMENSION_TYPE")
    private String dimensionType;

    @ApiModelProperty(value = "维度属性：1,动态;2.静态")
    @TableField("DIMENSION_ATTR")
    private String dimensionAttr;

    @TableLogic
    @ApiModelProperty(value = "状态：0删除 1启用 2禁用")
    @TableField("STATUS")
    private String status;

    @ApiModelProperty(value = "修改人", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "修改时间 ", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy/MM/dd")
    private Date updateDate;

    @ApiModelProperty(value = "说明")
    @TableField("COMMENTS")
    private String comments;

    @ApiModelProperty(value = "使用年份")
    @TableField("ACTIVE_YEAR")
    @JSONField(format = "yyyy")
    private String activeYear;

}
